public class Sort {
    public static void main(String[] args) {
        int x=2;
        int y=3;
        System.err.println(x&=y);
        System.err.println(x^=y);
        System.err.println(x|=y);
        System.err.println(x>>=y);
        System.err.println(x>>=y);


    }
    //冒泡排序
    public void mpSort(){
        int[] array={1,2,3,4,5,6,6,6,6,6,6,6,6,2,3,4,1,1,1,1};
        for (int i=0;i<array.length;i++){
            for (int j=0;j<array.length-1;j++){
                if (array[j]>array[j+1]){
                    int temp = array[j];
                    array[j] = array[j + 1];
                    array[j + 1] = temp;
                }

            }
        }
        for (int num:array) {
            System.err.print(" " +num);
        }
    }
    //快速排序
    public void ksSort(){
        int[] array={1,2,3,4,5,6,6,6,6,6,6,6,6,2,3,4,1,1,1,1};
        for (int i=0;i<array.length;i++){
            for (int j=0;j<array.length-1;j++){
                if (array[j]>array[j+1]){
                    int temp = array[j];
                    array[j] = array[j + 1];
                    array[j + 1] = temp;
                }

            }
        }
        for (int num:array) {
            System.err.print(" " +num);
        }
    }
}
